program Kasatelnaya;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  x0, y0, x1, y1, r, k1, k2 :integer;
  a1, b1, a2, b2, c1, c2, s1, s2, d :real;
begin
  writeln('Enter x0:');
  readln(x0);

  writeln('Enter y0:');
  readln(y0);

  writeln('Enter x1:');
  readln(x1);

  writeln('Enter y1:');
  readln(y1);

  writeln('Enter r:');
  readln(r);

  k1:=x1-x0;
  k2:=y1-y0;

  d:=sqrt(k1*k1+k2*k2);

  a1:=(r*k1+k2*sqrt(d*d-r*r)) / (d*d);
  b1:=(r*k2-k1*sqrt(d*d-r*r)) / (d*d);

  a2:=(r*k1-k2*sqrt(d*d-r*r)) / (d*d);
  b2:=(r*k2+k1*sqrt(d*d-r*r)) / (d*d);

  c1:=(-b1*y0-a1*x0);
  c2:=(-b2*y0-a2*x0);

  s1:=(a1*x0+b1*y0+c1);
  s2:=(a2*x0+b2*y0+c2);

  writeln(a1:0:2, ' ',b1:0:2, ' ',c1:0:2);
  writeln(a2:0:2, ' ',b2:0:2, ' ',c2:0:2);

  readln;
end.
 